package jmu.db.test.xtest.validator ;


public class Validator
{
    public boolean validate ( final Object expected, final Object actual )
    {
        // pre-results
        final boolean expectedIsNull = (null == expected) ;
        final boolean actualIsNull = (null == actual) ;

        // return true if both is null
        // return false if one of both is null
        if ( expectedIsNull || actualIsNull )
        {
            return expectedIsNull && actualIsNull ;
        }

        return expected.equals ( actual ) ;
    }
}
